Warm reboot: Add common warm start functions to be used by all SWSS processes#547
Merged
lguohan merged 6 commits intosonic-net:masterfrom Aug 9, 2018
Merged
Conversation
This was referenced Jul 27, 2018
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
859d020 to
830e91e
Compare
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
830e91e to
940ee19
Compare
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Contributor
|
retest this please |
lguohan
reviewed
Aug 4, 2018
warmrestart/warm_restart.cpp
Outdated
| warmStart.enabled = false; | ||
|
|
||
| // Check system level warm restart config first | ||
| auto pvalue = warmStart.m_cfgRedisClient->hget(CFG_WARM_RESTART_TABLE_NAME"|system", "enable"); |
Contributor
There was a problem hiding this comment.
| should not be hard coded.
Contributor
Author
There was a problem hiding this comment.
Probably table should be expanded with member functions like getEntry(const std::string &key, const std::string &field) and setEntry(const std::string &key, const std::string &field, const std::string &value)
I switched to using RedisClient to avoid the clumsy key level only operations.
Will give it a try.
…ent operations Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-swss
that referenced
this pull request
Mar 1, 2023
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
…rocesses (sonic-net#547) * Add common warm start functions to be used by all SWSS processes Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Use updated state schema Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Adapt to the new warm reboot schema Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Use the new Table::getEntry() and Table::setEntry to replace redisClient operations Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * use the new Table:hget() and Table:hset() APIs Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com> * Add illustration about warm start knob usage Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Jipan Yang jipan.yang@alibaba-inc.com
What I did
Add common support functions for SWSS warm restart check, restart count and state log.
The functions are supposed to be used by all processes in SWSS docker.
Why I did it
support functions for warm restart feature.
How I verified it
admin@sonic:~$ redis-cli
127.0.0.1:6379> keys WAR*
127.0.0.1:6379> hgetall "WARM_RESTART_TABLE:orchagent"
127.0.0.1:6379> hgetall "WARM_RESTART_TABLE:portsyncd"
Details if related